﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace FRL.DebtChased.Repository.ViewModels
{

	/// <summary>
	/// Declaration of ClientSummaryModel class
	/// </summary>
	public class ClientSummaryModel2
	{

		/////////////////////////////////////////////////////////////
		// Attributes

		public string Name { get; set; }

		public string Website { get; set; }

		public string Activity { get; set; }

		/////////////////////////////////////////////////////////////
		// Construction

		public ClientSummaryModel2(DebtChasedEntities ent, int iClientId)
		{

			// Load client details
			var client = (from c in ent.Clients
						 where (c.ClientId == iClientId)
						 select new { c.Name, c.Website, c.Activity }).FirstOrDefault();
			this.Name = client.Name;
			this.Website = client.Website;
			this.Activity = client.Activity;

		}

	}

}
